/////////////////////////////////////////////////////////////////////////////
// Copyright(c) 2012-2015 purang All Rights Reserved
// Name:        event_win.h
// Purpose:
// Author:      syy
// Modified by:
// Created:     2014/1/3 15:10
// RCS-ID:
// Licence:
/////////////////////////////////////////////////////////////////////////////
#ifndef PR_SYSTEM_WRAPPERS_SOURCE_EVENT_WIN_H_
#define PR_SYSTEM_WRAPPERS_SOURCE_EVENT_WIN_H_

#include <windows.h>

#include "../typedefs.h"
#include "event_wrapper.h"

namespace qb {

class EventWindows : public EventWrapper {
 public:
  EventWindows(bool manuReset);
  virtual ~EventWindows();

  virtual EventTypeWrapper Wait(unsigned long max_time);
  virtual bool Set();
  virtual bool Reset();

  virtual bool StartTimer(bool periodic, unsigned long time);
  virtual bool StopTimer();

 private:
  HANDLE event_;
  uint32_t timerID_;
};

}  // namespace qb

#endif  // PR_SYSTEM_WRAPPERS_SOURCE_EVENT_WIN_H_
